package com.mdsd.cloud.dasservice.service.mapping;/**
 * @@author ： zhu jian wen
 * @@date ：Created in 2022/3/10 14:22
 * @@description：
 * @@modified By：
 * @@version:
 */

import @(Model.package).@(Model.clazz);
import com.mdsd.cloud.dasservice.service.setting.dto.CodeMap;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @@author: zhu jian wen
 * @@date: 2022/3/10 14:22
 * @@description:
 * @@modified By:
 * @@version:
 */
@@Service("@(Model.clazz)")
public class @(Model.clazz)ConvertService implements IConvertService<@(Model.clazz)>{
    @@Override
    public @(Model.clazz) convert(@(Model.clazz) src, HashMap<String, HashMap<String, String>> codeMaps) {
    @foreach (var item in Model.fileds) {
   @($@"
        src.set{item.upper}(mapping(""{item.lower}"",src.get{item.upper}(), codeMaps));")
}
        
        return src;
    }
}
